package com.zb.Service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zb.Service.MoneyService;
import com.zb.entity.Money;
import com.zb.mapper.MoneyMapper;

@Component("MoneyService")
public class MoneyServiceImpl implements MoneyService {
	@Autowired
	private MoneyMapper moneyMapper;

	public List<Money> findMoney() {

		return moneyMapper.findMoney();
	}

	public void saveMoney(Money money) {
		moneyMapper.saveMoney(money);
	}

	public void delectMoney(int id) {
		moneyMapper.delectMoney(id);
	}

	public void updateMoney(Money money) {
		moneyMapper.updateMoney(money);
	}

	public Money getMoneyById(int id) {
		return moneyMapper.getMoneyById(id);
	}

	public int getMaxId() {
		// TODO Auto-generated method stub
		return moneyMapper.getMaxId();
	}

}